/**
 * Create in 2012-4-25.
 */
package kit4j.tests.jdk.swing;

import java.util.Date;

import javax.swing.JFormattedTextField;

import org.junit.Test;

/**
 * 
 * @author MiniKnife
 *
 */
public class TestJFormattedTextField {

	@Test
	public void testShowDate() {
		JFormattedTextField field = new JFormattedTextField();
		field.setValue(new Date());
		
		showField(field);
	}
	
	@Test
	public void testShowNumber() {
		JFormattedTextField field = new JFormattedTextField();
		field.setValue(new Integer(10));
		
		showField(field);
	}
	
	private void showField(JFormattedTextField field) {
		SwingUtil.showComponent(field);
	}
}
